import   re
text = """Hello World
This is a test
Regular expressions are powerful
"""

#匹配每行开头的字母
pattern = r'^([A-Za-z])'
matches = re.findall(pattern, text, re.MULTILINE)
print("每行开头的字母:", matches)